<%@page import="com.office.automate.frontier.utility.DataConversionUtility"%>
<%@page import="com.office.automate.model.report.MonthlyCoinAnalysis"%>
<%@page import="com.office.automate.dataaccess.impl.administration.DivisionDaoImplementer"%>
<%@page import="com.office.automate.dataaccess.impl.user.EmployeeDaoImplementer"%>
<%@page import="com.office.automate.service.impl.employee.EmployeeServiceImplementer"%>
<%@page import="com.office.automate.model.employee.Employee"%>
<%@page import="com.office.automate.configuration.property.ConfigurationProperties"%>
<%@page import="java.util.Properties"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.office.automate.service.impl.report.ReportingServiceImplementer"%>
<%@page import="com.office.automate.model.report.EmployeeLeaveDetailsRequest"%>
<%@page import="com.office.automate.model.leave.LeaveRequest"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ include file="../common/CommonHeaderInfo.jsp"%>
<title>Current Month Coin Analysis</title>
</head>
<body>
	<%@ include file="../common/SiteHeaderSection.jsp" %>
	<%@ include file="../common/MainMenuBar.jsp"%>

<%
	if (currentUser == null) {
		return;
	}
	Properties configSeqPropspg = ConfigurationProperties.getProps(); 
	Utility utilpg = new Utility(currentUser.getSecurityLevels());
	if (!utilpg.isFunctionalSecurityAllow(configSeqPropspg.getProperty("MAIN_REPORTING")) ||  
				!utilpg.isFunctionalSecurityAllow(configSeqPropspg.getProperty("REPORT_COIN_ANALYSIS")))  {
		response.sendRedirect("/OfficeAutomation/jsp/HomePage.jsp");
	}
	DataConversionUtility dcUtility = new DataConversionUtility();
	MonthlyCoinAnalysis monthlyCoinAnalysisDetails = new ReportingServiceImplementer().getMonthlyCoinAnalysisDetails(dcUtility.getCurentBillingPeriod());
	SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
	Properties properties = ConfigurationProperties.getProps();
%>
<tr>
	<td>
	  <center>
			<h2>Coin Analysis Report For The Period  <%=dcUtility.getCurentBillingPeriod() %> </h2>
			<table class="reportgridstyle">
				<tr class="grid-heding-row-style">
		
					<th class="grid-heding-cell-style">Type of Bill/ Coin</th>
					<th class="grid-heding-cell-style">Number Of Bills/ Coins Require</th>
			
				</tr>
			<%
			  if (monthlyCoinAnalysisDetails != null) {
			%>	
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Five Thousand Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getFiveThousandRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Two Thousand Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTwothousandReupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Thousand Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getThousandRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Five Hundred Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getFiveHundredRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Hundred Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getHundredRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Fifty Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getFiftyRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Twenty Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTwentyRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Ten Rupee Bills Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTenRupeeBillsCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Five Rupee Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getFiveRupeeCoinCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Two Rupee Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTwoRupeeCoinCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> One Rupee Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getOneRupeeCoinCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Fifty Cents Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getFiftyCentCoinCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Twenty Five Cents Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTwentyFiveCentCoinCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Ten Cents Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTenCentCoinCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> Five Cents Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getFiveCentCoinsCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Two Cents Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getTwoCentCoinsCount() %></td>
					</tr>
					<tr class="data-row-even-style" >
						<td class="data-row-cell-style"> One Cents Coins Count : </td>
						<td class="data-row-cell-style"><%=monthlyCoinAnalysisDetails.getOneCentCoinsCount() %></td>
					</tr>
					<tr class="data-row-odd-style">
						<td class="data-row-cell-style"> Total Cash Amount Require : </td>
						<td class="data-row-cell-style"><%=String.format("%.2f", monthlyCoinAnalysisDetails.getAmountToBePayByCash()) %></td>
					</tr>
			<%
			  } else {
			%>
		
			<%
			  }
			%>
			</table>
		 </center>
	</td>
</tr>
		
<%@ include file="../common/SiteFotterSection.jsp" %>
</body>
</html>